use std::thread::sleep;
use std::time::{Duration, Instant};

fn main() {
    let start = Instant::now();
    expensive_function();
    let duration = start.elapsed();

    println!("Time elapsed in expensive_function() is {:?}", duration);
}

fn expensive_function() {
    sleep(Duration::from_secs(2));
}
